<pro-header></pro-header>

<!--引入list组件-->
<nz-card [nzBordered]="false">
     <form nz-form (ngSubmit)="getData('search')" [nzLayout]="'inline'">
        <div nz-row [nzGutter]="24">
            <div nz-col [nzSpan]="8" class="mb-md">
                <div nz-form-item class="d-flex">
                    <div nz-form-label><label for="name">工作项</label></div>
                    <div nz-form-control class="flex-1">
                        <nz-input [(ngModel)]="search.itemName" name="itemName" [nzSize]="'large'" [nzPlaceHolder]="'工作项'" nzId="itemName"></nz-input>
                    </div>
                </div>
            </div>
            <div  nz-col [nzSpan]="8" class="mb-md">
                <div nz-form-item class="d-flex">
                    <div nz-form-label><label for="status">撤销状态</label></div>
                    <div nz-form-control class="flex-1">
                        <nz-select [(ngModel)]="search.repealStatus" name="repealStatus" nzId="repealStatus" [nzPlaceHolder]="'撤销状态'"  [nzSize]="'large'">
                            <nz-option *ngFor="let i of repealStatus; let idx = index" [nzLabel]="i.label" [nzValue]="i.value"></nz-option>
                        </nz-select>
                    </div>
                </div>
            </div>
            <div nz-col [nzSpan]="expandForm ? 24 : 8" class="mb-md" [class.text-right]="expandForm">
                <button nz-button type="submit" [nzType]="'primary'" [nzLoading]="loading" [nzSize]="'large'">查询</button>
                <button nz-button type="reset" (click)="reset()" [nzSize]="'large'" class="mx-sm">重置</button>
            </div>
        </div>
    </form>
  <app-list #child [initDate]="data" 
                     [loading]="listloading"
                       [showAdd]="showAdd" 
                       [isPagination]="isPagination"  
                       (pageNumber)="monitorHandler($event)"
                        (buttonEvent)="buttonEvent($event)" 
                        [headerDate]="headerDate"
                        [total]="total" 
                        [pageTotal] = 'pageTotal'  
                        [pageIndex]='pageIndex'>
     </app-list>
</nz-card>
 <nz-modal [nzVisible]="delayListModal" [nzMaskClosable]= 'false' [nzWidth]="1300" [nzTitle]="'撤销代码列表'" [nzConfirmLoading]="loading" [nzContent]="delay"
              (nzOnCancel)="delayListModal=false" (nzOnOk)="getGodelayList()" [nzZIndex] = "'20'" >
        <ng-template #delay>
             <nz-input [nzType]="'search'" [nzPlaceHolder]="'搜索代码路径'" [(ngModel)]="searchRevert" style="width:80%;" (nzOnSearch)="onSearch($event)"></nz-input>
           <app-list
            [initDate]="delayListData"
            [isPagination]="isdelayPagination"
            (selectedRow)="selectedRow($event)"
            [headerDate]="delayHeaderDate"
            [total]="delayListData.length"
            showAdd = true
            [loading]="listloading" 
            [isShowTotal] = true
            [isShowTotalhead] = true
            subtotalseleced = true
            [pageIndex]='delayPageIndex'
            (pageNumber)="delayMonitorHandler($event)"
            [pageTotal] = 'delaypageTotal'
            [isCaocuo] = 'isCaocuo'
          
           >
           </app-list>
      </ng-template>
    </nz-modal>
   
<nz-modal [nzVisible]="delaysModal" [nzWidth]="1300" [nzTitle]="'延期代码详情'"  [nzContent]="delays"
            (nzOnCancel)="delaysModal=false"  [nzConfirmLoading]="loading"  [nzFooter]="ewqewq">
        <ng-template #delays>

       <nz-card [nzBordered]="false">
        <div  nz-col [nzSpan]="24"  *ngFor="let s of checkModalData ; let l = index" >
                    <div  *ngFor="let k of s.deliveryPatchDetails" style="margin-bottom: 20px;">
                        <nz-table #nzTables   nzBordered  [nzIsPagination]="false"  [nzDataSource]="s.deliveryPatchDetails">
                            <tbody nz-tbody  >
                            <tr >
                                <td class="bcolor widthTd" colspan="2" >工程名</td>
                                <td class="widthTdok">{{s.projectName}}</td>
                            </tr>

                            <tr >
                                <td class="bcolor widthTd" colspan="2">编译为</td>
                                <td  class="widthTdok">{{k.patchType}}</td>
                            </tr>
                            <tr>
                                <td class="bcolor widthTd" colspan="2" >部署到</td>
                                <td  class="widthTdok">{{k.deployWhere}}</td>
                            </tr>
                            <tr >
                              <td class="bcolor widthTd">变动类型</td>
                              <td class="bcolor widthTd">状态</td>
                                <td class="bcolor widthTdok"  >代码</td>
                            </tr>
                            <tr  *ngFor="let x of k.fileList;let q = index">
                              <td class="widthTd">{{x.commitType}}</td>
                                <td class="widthTd">{{x.deliveryStatus}}</td>
                                <td class="widthTdok" title="{{x.fullPath}}">{{x.fullPath}}</td>
                                
                             
                            </tr>
                            </tbody>
                        </nz-table>
                    </div>
            </div>
     
        </nz-card>
        </ng-template>
        <ng-template #ewqewq>
                    </ng-template>
    </nz-modal>
      <nz-modal [nzVisible]="updEnvironment"   [nzConfirmLoading]="loading" [nzWidth]="1024" [nzTitle]="'修改当前工作项的投放时间与窗口'"   [nzContent]="updModal"
                  (nzOnCancel)="updEnvironment=false" (nzOnOk)="submitUpd()"  >
                <ng-template #updModal>
                    <div  nz-form-item class="d-flex">
                            <div nz-form-label><label for="itemType">当前运行环境</label></div>
                            <div nz-form-control class="flex-1">
                                {{updPackTiming.profilesName}}
                            </div>
                        </div>
                    <div  nz-form-item class="d-flex">
                            <div nz-form-label><label for="itemType">可选时间</label></div>
                            <div nz-form-control class="flex-1">
                                <nz-datepicker [(ngModel)]="updPackTiming.deliveryTime"      (ngModelChange)="onChange(updPackTiming)" [nzPlaceHolder]="'请选择日期'" [nzDisabledDate]="_disabledDate"></nz-datepicker>
                                <!--{{updPackTiming.profilesName}}-->
                            </div>
                        </div>
                    <div  nz-form-item class="d-flex">
                            <div nz-form-label><label for="itemType">可选窗口</label></div>
                            <div nz-form-control class="flex-1">
                                <!--<label nz-radio [(ngModel)]="updPackTiming.PackTiming" *ngFor="let t of updPackTiming.packTimeDetails; let d = index">
                                         <span>{{t.packTime}}</span>
                                     </label>-->
                                <nz-radio-group [(ngModel)]="updPackTiming.packTiming">
                                    <label *ngFor="let i of updPackTiming['packTimeDetails'];"  [nzDisabled]="i.isOptions ==='N'" nz-radio [nzValue]="i.packTime">
                                        <span>{{i.packTime}}</span>
                                    </label>
                                </nz-radio-group>



                            </div>
                        </div>
                </ng-template>
        </nz-modal>